<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  <html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<!-- template designed by Marco Von Ballmoos -->
			<title>Docs For Class MongodbSource</title>
			<link rel="stylesheet" href="../../media/stylesheet.css" />
			<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
		</head>
		<body>
			<div class="page-body">			
<h2 class="class-name">Class MongodbSource</h2>

<a name="sec-description"></a>
<div class="info-box">
	<div class="info-box-title">Description</div>
	<div class="nav-bar">
					<span class="disabled">Description</span> |
													<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
						|											<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
						
					</div>
	<div class="info-box-body">
        		<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">MongoDB Source</p>
		<p class="notes">
			Located in <a class="field" href="_datasources---mongodb_source.php.html">/datasources/mongodb_source.php</a> (line <span class="field">35</span>)
		</p>
		
				
		<pre>DboSource
   |
   --MongodbSource</pre>
	
			</div>
</div>



	<a name="sec-var-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Variable Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
						<span class="disabled">Vars</span> (<a href="#sec-vars">details</a>)
							| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
								</div>
		<div class="info-box-body">
			<div class="var-summary">
																																																																								<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$columns" title="details" class="var-name">$columns</a>
				</div>
																<div class="var-title">
					<span class="var-type">boolean</span>
					<a href="#$connected" title="details" class="var-name">$connected</a>
				</div>
																<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$_baseConfig" title="details" class="var-name">$_baseConfig</a>
				</div>
																<div class="var-title">
					<span class="var-type">resource</span>
					<a href="#$_db" title="details" class="var-name">$_db</a>
				</div>
																<div class="var-title">
					<span class="var-type">array</span>
					<a href="#$_defaultSchema" title="details" class="var-name">$_defaultSchema</a>
				</div>
																<div class="var-title">
					<span class="var-type">string</span>
					<a href="#$_driverVersion" title="details" class="var-name">$_driverVersion</a>
				</div>
																<div class="var-title">
					<span class="var-type">mixed</span>
					<a href="#$_startTime" title="details" class="var-name">$_startTime</a>
				</div>
											</div>
		</div>
	</div>

	<a name="sec-method-summary"></a>
	<div class="info-box">
		<div class="info-box-title">Method Summary</span></div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
																		<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
				 
				|
						<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
		</div>
		<div class="info-box-body">			
			<div class="method-summary">
																																																																																																																																																																																																																																																																																																																																																						
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#__construct" title="details" class="method-name">__construct</a>
											([<span class="var-type">array</span>&nbsp;<span class="var-name">$config</span> = <span class="var-default">array()</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$autoConnect</span> = <span class="var-default">false</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#__destruct" title="details" class="method-name">__destruct</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#begin" title="details" class="method-name">begin</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#calculate" title="details" class="method-name">calculate</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, <span class="var-type">Model</span>&nbsp;<span class="var-name">$Model</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#close" title="details" class="method-name">close</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#commit" title="details" class="method-name">commit</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#connect" title="details" class="method-name">connect</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#create" title="details" class="method-name">create</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$fields</span> = <span class="var-default">null</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$values</span> = <span class="var-default">null</span>], <span class="var-type">Model</span>&nbsp;<span class="var-name">$Model</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#createConnectionName" title="details" class="method-name">createConnectionName</a>
											(<span class="var-type">array</span>&nbsp;<span class="var-name">$config</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$version</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#createSchema" title="details" class="method-name">createSchema</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$schema</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$tableName</span> = <span class="var-default">null</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#delete" title="details" class="method-name">delete</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$conditions</span> = <span class="var-default">null</span>], <span class="var-type">Model</span>&nbsp;<span class="var-name">$Model</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#deriveSchemaFromData" title="details" class="method-name">deriveSchemaFromData</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$Model</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$data</span> = <span class="var-default">array()</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#describe" title="details" class="method-name">describe</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$field</span> = <span class="var-default">null</span>], <span class="var-type">Model</span>&nbsp;<span class="var-name">$Model</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#disconnect" title="details" class="method-name">disconnect</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#distinct" title="details" class="method-name">distinct</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$keys</span> = <span class="var-default">array()</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$params</span> = <span class="var-default">array()</span>], <span class="var-type">mixed</span>&nbsp;<span class="var-name">$Model</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#dropSchema" title="details" class="method-name">dropSchema</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$schema</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$tableName</span> = <span class="var-default">null</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#ensureIndex" title="details" class="method-name">ensureIndex</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$keys</span> = <span class="var-default">array()</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$params</span> = <span class="var-default">array()</span>], <span class="var-type">mixed</span>&nbsp;<span class="var-name">$Model</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#execute" title="details" class="method-name">execute</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$query</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$params</span> = <span class="var-default">array()</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#getMongoCollection" title="details" class="method-name">getMongoCollection</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#getMongoDb" title="details" class="method-name">getMongoDb</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#group" title="details" class="method-name">group</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$params</span> = <span class="var-default">array()</span>], <span class="var-type">mixed</span>&nbsp;<span class="var-name">$Model</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#insertMulti" title="details" class="method-name">insertMulti</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$table</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$fields</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$values</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#isConnected" title="details" class="method-name">isConnected</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#isInterfaceSupported" title="details" class="method-name">isInterfaceSupported</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$interface</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#listSources" title="details" class="method-name">listSources</a>
											([<span class="var-type">array</span>&nbsp;<span class="var-name">$data</span> = <span class="var-default">null</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#logQuery" title="details" class="method-name">logQuery</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$query</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$args</span> = <span class="var-default">array()</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#mapReduce" title="details" class="method-name">mapReduce</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$query</span>, [<span class="var-type">integer</span>&nbsp;<span class="var-name">$timeout</span> = <span class="var-default">null</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">string</span>
										<a href="#name" title="details" class="method-name">name</a>
											(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#query" title="details" class="method-name">query</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$query</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$params</span> = <span class="var-default">array()</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#read" title="details" class="method-name">read</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$query</span> = <span class="var-default">array()</span>], <span class="var-type">Model</span>&nbsp;<span class="var-name">$Model</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#rollback" title="details" class="method-name">rollback</a>
										()
									</div>
														
				<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#setTimeout" title="details" class="method-name">setTimeout</a>
											(<span class="var-type">int</span>&nbsp;<span class="var-name">$ms</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#truncate" title="details" class="method-name">truncate</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$table</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#update" title="details" class="method-name">update</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$fields</span> = <span class="var-default">null</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$values</span> = <span class="var-default">null</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$conditions</span> = <span class="var-default">null</span>], <span class="var-type">Model</span>&nbsp;<span class="var-name">$Model</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">boolean</span>
										<a href="#updateAll" title="details" class="method-name">updateAll</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$fields</span> = <span class="var-default">null</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$conditions</span> = <span class="var-default">null</span>], <span class="var-type">Model</span>&nbsp;<span class="var-name">$Model</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">mixed</span>
										<a href="#value" title="details" class="method-name">value</a>
											(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$data</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$column</span> = <span class="var-default">null</span>], [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$read</span> = <span class="var-default">true</span>])
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#_convertId" title="details" class="method-name">_convertId</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$mixed</span>, [<span class="var-type">bool</span>&nbsp;<span class="var-name">$conditions</span> = <span class="var-default">false</span>], <span class="var-type">mixed</span>&nbsp;<span class="var-name">$mixed</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#_prepareLogQuery" title="details" class="method-name">_prepareLogQuery</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$Model</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#_setEmptyValues" title="details" class="method-name">_setEmptyValues</a>
											(<span class="var-type"></span>&nbsp;<span class="var-name">&$data</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$integers</span> = <span class="var-default">array('limit', 'offset')</span>], <span class="var-type">mixed</span>&nbsp;<span class="var-name">$data</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">array</span>
										<a href="#_stringify" title="details" class="method-name">_stringify</a>
											([<span class="var-type"></span>&nbsp;<span class="var-name">&$args</span> = <span class="var-default">array()</span>], [<span class="var-type">int</span>&nbsp;<span class="var-name">$level</span> = <span class="var-default">0</span>], <span class="var-type">array</span>&nbsp;<span class="var-name">$args</span>)
									</div>
														
				<div class="method-definition">
											<span class="method-result">void</span>
										<a href="#_stripAlias" title="details" class="method-name">_stripAlias</a>
											([<span class="var-type"></span>&nbsp;<span class="var-name">&$args</span> = <span class="var-default">array()</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$alias</span> = <span class="var-default">'Model'</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$recurse</span> = <span class="var-default">true</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$check</span> = <span class="var-default">'key'</span>], <span class="var-type">array</span>&nbsp;<span class="var-name">$args</span>)
									</div>
											</div>
		</div>
	</div>		

	<a name="sec-vars"></a>
	<div class="info-box">
		<div class="info-box-title">Variables</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
										<a href="#sec-var-summary">Vars</a> (<span class="disabled">details</span>)
						
			
										| 
									<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
							
					</div>
		<div class="info-box-body">
			
<a name="var$columns" id="$columns"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$columns</span>
			 = <span class="var-default">array(<br />		'boolean' =&gt; array('name' =&gt; 'boolean'),'string'=&gt;array('name'=&gt;'varchar'),'text'=&gt;array('name'=&gt;'text'),'integer'=&gt;array('name'=&gt;'integer','format'=&gt;null,'formatter'=&gt;'intval'),'float'=&gt;array('name'=&gt;'float','format'=&gt;null,'formatter'=&gt;'floatval'),'datetime'=&gt;array('name'=&gt;'datetime','format'=&gt;null,'formatter'=&gt;'MongodbDateFormatter'),'timestamp'=&gt;array('name'=&gt;'timestamp','format'=&gt;null,'formatter'=&gt;'MongodbDateFormatter'),'time'=&gt;array('name'=&gt;'time','format'=&gt;null,'formatter'=&gt;'MongodbDateFormatter'),'date'=&gt;array('name'=&gt;'date','format'=&gt;null,'formatter'=&gt;'MongodbDateFormatter'),)</span>			(line <span class="line-number">101</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">column definition</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$connected" id="$connected"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">boolean</span>
			<span class="var-name">$connected</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">47</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Are we connected to the DataSource?</p>
<p class="description"><p>true - yes  null - haven't tried yet  false - nope, and we can't connect</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$_baseConfig" id="$_baseConfig"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$_baseConfig</span>
			 = <span class="var-default">array(<br />		'set_string_id' =&gt; true,<br />		'persistent' =&gt; true,<br />		'host'       =&gt; 'localhost',<br />		'database'   =&gt; '',<br />		'port'       =&gt; '27017',<br />		'login'		=&gt; '',<br />		'password'	=&gt; ''<br />	)</span>			(line <span class="line-number">86</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Base Config</p>
<p class="description"><p>set_string_id:     true: In read() method, convert MongoId object to string and set it to array 'id'.     false: not convert and set.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	
		
		

</div>
<a name="var$_db" id="$_db"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">resource</span>
			<span class="var-name">$_db</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">55</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Database Instance</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_defaultSchema" id="$_defaultSchema"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">array</span>
			<span class="var-name">$_defaultSchema</span>
			 = <span class="var-default">array(<br />		'_id' =&gt; array('type' =&gt; 'string', 'length' =&gt; 24, 'key' =&gt; 'primary'),'created'=&gt;array('type'=&gt;'datetime','default'=&gt;null))</span>			(line <span class="line-number">119</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Default schema for the mongo models</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_driverVersion" id="$_driverVersion"><!-- --></A>
<div class="oddrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">string</span>
			<span class="var-name">$_driverVersion</span>
			 = <span class="var-default"> Mongo::VERSION</span>			(line <span class="line-number">63</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Mongo Driver Version</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
<a name="var$_startTime" id="$_startTime"><!-- --></A>
<div class="evenrow">

	<div class="var-header">
		<span class="var-title">
			<span class="var-type">mixed</span>
			<span class="var-name">$_startTime</span>
			 = <span class="var-default"> null</span>			(line <span class="line-number">73</span>)
		</span>
	</div>

	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">startTime property</p>
<p class="description"><p>If debugging is enabled, stores the (micro)time the current query started</p></p>
	<ul class="tags">
				<li><span class="field">var:</span> null</li>
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	
		
		

</div>
						
		</div>
	</div>
	
	<a name="sec-methods"></a>
	<div class="info-box">
		<div class="info-box-title">Methods</div>
		<div class="nav-bar">
			<a href="#sec-description">Description</a> |
															<a href="#sec-var-summary">Vars</a> (<a href="#sec-vars">details</a>)
																	<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
						
		</div>
		<div class="info-box-body">
			<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">Constructor __construct</span> (line <span class="line-number">134</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">construct method</p>
<p class="description"><p>By default don't try to connect until you need to</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			__construct
		</span>
					([<span class="var-type">array</span>&nbsp;<span class="var-name">$config</span> = <span class="var-default">array()</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$autoConnect</span> = <span class="var-default">false</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$config</span><span class="var-description">: Configuration array</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$autoConnect</span><span class="var-description">: false</span>			</li>
				</ul>
		
			
	</div>
<a name="method__destruct" id="__destruct"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">Destructor __destruct</span> (line <span class="line-number">143</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Destruct</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			__destruct
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodbegin" id="begin"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">begin</span> (line <span class="line-number">411</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">begin method</p>
<p class="description"><p>Mongo doesn't support transactions</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			begin
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodcalculate" id="calculate"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">calculate</span> (line <span class="line-number">422</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Calculate</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			calculate
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, <span class="var-type">Model</span>&nbsp;<span class="var-name">$Model</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">Model</span>
				<span class="var-name">$Model</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$Model</span>			</li>
				</ul>
		
			
	</div>
<a name="methodclose" id="close"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">close</span> (line <span class="line-number">332</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Close database connection</p>
	<ul class="tags">
				<li><span class="field">return:</span> Connected</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			close
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodcommit" id="commit"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">commit</span> (line <span class="line-number">157</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">commit method</p>
<p class="description"><p>MongoDB doesn't support transactions</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			commit
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodconnect" id="connect"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">connect</span> (line <span class="line-number">172</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Connect to the database</p>
<p class="description"><p>If using 1.0.2 or above use the mongodb:// format to connect  The connect syntax changed in version 1.0.2 - so check for that too</p><p>If authentication information in present then authenticate the connection</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> Connected</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			connect
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodcreate" id="create"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">create</span> (line <span class="line-number">447</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Create Data</p>
	<ul class="tags">
				<li><span class="field">return:</span> Insert result</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			create
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$fields</span> = <span class="var-default">null</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$values</span> = <span class="var-default">null</span>], <span class="var-type">Model</span>&nbsp;<span class="var-name">$Model</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">Model</span>
				<span class="var-name">$Model</span><span class="var-description">: Model Instance</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$fields</span><span class="var-description">: Field data</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$values</span><span class="var-description">: Save data</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$Model</span>			</li>
				</ul>
		
			
	</div>
<a name="methodcreateConnectionName" id="createConnectionName"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">createConnectionName</span> (line <span class="line-number">210</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">create connection name.</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			createConnectionName
		</span>
					(<span class="var-type">array</span>&nbsp;<span class="var-name">$config</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$version</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$config</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$version</span><span class="var-description">: version of MongoDriver</span>			</li>
				</ul>
		
			
	</div>
<a name="methodcreateSchema" id="createSchema"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">createSchema</span> (line <span class="line-number">497</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">createSchema method</p>
<p class="description"><p>Mongo no care for creating schema. Mongo work with no schema.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			createSchema
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$schema</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$tableName</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$schema</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$tableName</span><span class="var-description">: null</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddelete" id="delete"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">delete</span> (line <span class="line-number">851</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Delete Data</p>
<p class="description"><p>For deleteAll(true, false) calls - conditions will arrive here as true - account for that and  convert to an empty array  For deleteAll(array('some conditions')) calls - conditions will arrive here as:   array(   	Alias._id =&gt; array(1, 2, 3, ...)   )</p><p>This format won't be understood by mongodb, it'll find 0 rows. convert to:</p><p>array(   	Alias._id =&gt; array('$in' =&gt; array(1, 2, 3, ...))   )</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> Update result</li>
				<li><span class="field">TODO:</span> bench remove() v drop. if it's faster to drop - just drop the collection taking into       account existing indexes (recreate just the indexes)</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			delete
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$conditions</span> = <span class="var-default">null</span>], <span class="var-type">Model</span>&nbsp;<span class="var-name">$Model</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">Model</span>
				<span class="var-name">$Model</span><span class="var-description">: Model Instance</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$conditions</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$Model</span>			</li>
				</ul>
		
			
	</div>
<a name="methodderiveSchemaFromData" id="deriveSchemaFromData"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">deriveSchemaFromData</span> (line <span class="line-number">804</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">deriveSchemaFromData method</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			deriveSchemaFromData
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$Model</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$data</span> = <span class="var-default">array()</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$Model</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$data</span><span class="var-description">: array()</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddescribe" id="describe"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">describe</span> (line <span class="line-number">386</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Describe</p>
<p class="description"><p>Automatically bind the schemaless behavior if there is no explicit mongo schema.  When called, if there is model data it will be used to derive a schema. a row is plucked  out of the db and the data obtained used to derive the schema.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> if model instance has mongoSchema, return it.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			describe
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, [<span class="var-type"></span>&nbsp;<span class="var-name">$field</span> = <span class="var-default">null</span>], <span class="var-type">Model</span>&nbsp;<span class="var-name">$Model</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">Model</span>
				<span class="var-name">$Model</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$Model</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$field</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddisconnect" id="disconnect"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">disconnect</span> (line <span class="line-number">342</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Disconnect from the database</p>
	<ul class="tags">
				<li><span class="field">return:</span> Connected</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			disconnect
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methoddistinct" id="distinct"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">distinct</span> (line <span class="line-number">550</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">distinct method</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			distinct
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$keys</span> = <span class="var-default">array()</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$params</span> = <span class="var-default">array()</span>], <span class="var-type">mixed</span>&nbsp;<span class="var-name">$Model</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$Model</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$keys</span><span class="var-description">: array()</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$params</span><span class="var-description">: array()</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$Model</span>			</li>
				</ul>
		
			
	</div>
<a name="methoddropSchema" id="dropSchema"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">dropSchema</span> (line <span class="line-number">511</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">dropSchema method</p>
<p class="description"><p>Return a command to drop each table</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			dropSchema
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$schema</span>, [<span class="var-type">mixed</span>&nbsp;<span class="var-name">$tableName</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$schema</span>			</li>
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$tableName</span><span class="var-description">: null</span>			</li>
				</ul>
		
			
	</div>
<a name="methodensureIndex" id="ensureIndex"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">ensureIndex</span> (line <span class="line-number">635</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">ensureIndex method</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			ensureIndex
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$keys</span> = <span class="var-default">array()</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$params</span> = <span class="var-default">array()</span>], <span class="var-type">mixed</span>&nbsp;<span class="var-name">$Model</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$Model</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$keys</span><span class="var-description">: array()</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$params</span><span class="var-description">: array()</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$Model</span>			</li>
				</ul>
		
			
	</div>
<a name="methodexecute" id="execute"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">execute</span> (line <span class="line-number">1142</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">execute method</p>
<p class="description"><p>If there is no query or the query is true, execute has probably been called as part of a  db-agnostic process which does not have a mongo equivalent, don't do anything.</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			execute
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$query</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$params</span> = <span class="var-default">array()</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$query</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$params</span><span class="var-description">: array()</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetMongoCollection" id="getMongoCollection"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">getMongoCollection</span> (line <span class="line-number">297</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">get MongoDB Collection Object</p>
	<ul class="tags">
				<li><span class="field">return:</span> MongoDB Collection Object</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			getMongoCollection
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$Model</span>			</li>
				</ul>
		
			
	</div>
<a name="methodgetMongoDb" id="getMongoDb"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">getMongoDb</span> (line <span class="line-number">284</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">get MongoDB Object</p>
	<ul class="tags">
				<li><span class="field">return:</span> MongoDB Object</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			getMongoDb
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodgroup" id="group"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">group</span> (line <span class="line-number">596</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">group method</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			group
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$params</span> = <span class="var-default">array()</span>], <span class="var-type">mixed</span>&nbsp;<span class="var-name">$Model</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$Model</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$params</span><span class="var-description">: <p>array()    Set params  same as MongoCollection::group()     key,initial, reduce, options(conditions, finalize)</p><p>Ex. $params = array(            'key' =&gt; array('field' =&gt; true),            'initial' =&gt; array('csum' =&gt; 0),            'reduce' =&gt; 'function(obj, prev){prev.csum += 1;}',            'options' =&gt; array(                 'condition' =&gt; array('age' =&gt; array('$gt' =&gt; 20)),                 'finalize' =&gt; array(),            ),        );</p></span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$Model</span>			</li>
				</ul>
		
			
	</div>
<a name="methodinsertMulti" id="insertMulti"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">insertMulti</span> (line <span class="line-number">238</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Inserts multiple values into a table</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			insertMulti
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$table</span>, <span class="var-type">string</span>&nbsp;<span class="var-name">$fields</span>, <span class="var-type">array</span>&nbsp;<span class="var-name">$values</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$table</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$fields</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$values</span>			</li>
				</ul>
		
			
	</div>
<a name="methodisConnected" id="isConnected"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">isConnected</span> (line <span class="line-number">271</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">check connection to the database</p>
	<ul class="tags">
				<li><span class="field">return:</span> Connected</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			isConnected
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodisInterfaceSupported" id="isInterfaceSupported"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">isInterfaceSupported</span> (line <span class="line-number">319</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">isInterfaceSupported method</p>
<p class="description"><p>listSources is infact supported, however: cake expects it to return a complete list of all  possible sources in the selected db - the possible list of collections is infinte, so it's  faster and simpler to tell cake that the interface is /not/ supported so it assumes that  &lt;insert name of your table here&gt; exist</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			isInterfaceSupported
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$interface</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$interface</span>			</li>
				</ul>
		
			
	</div>
<a name="methodlistSources" id="listSources"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">listSources</span> (line <span class="line-number">358</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Get list of available Collections</p>
	<ul class="tags">
				<li><span class="field">return:</span> Collections</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			listSources
		</span>
					([<span class="var-type">array</span>&nbsp;<span class="var-name">$data</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$data</span>			</li>
				</ul>
		
			
	</div>
<a name="methodlogQuery" id="logQuery"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">logQuery</span> (line <span class="line-number">1241</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">logQuery method</p>
<p class="description"><p>Set timers, errors and refer to the parent  If there are arguments passed - inject them into the query  Show MongoIds in a copy-and-paste-into-mongo format</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			logQuery
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$query</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$args</span> = <span class="var-default">array()</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$query</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$args</span><span class="var-description">: array()</span>			</li>
				</ul>
		
			
	</div>
<a name="methodmapReduce" id="mapReduce"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">mapReduce</span> (line <span class="line-number">1094</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">mapReduce</p>
	<ul class="tags">
				<li><span class="field">return:</span> false or array</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			mapReduce
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$query</span>, [<span class="var-type">integer</span>&nbsp;<span class="var-name">$timeout</span> = <span class="var-default">null</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$query</span>			</li>
					<li>
				<span class="var-type">integer</span>
				<span class="var-name">$timeout</span><span class="var-description">: (milli second)</span>			</li>
				</ul>
		
			
	</div>
<a name="methodname" id="name"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">name</span> (line <span class="line-number">434</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Quotes identifiers.</p>
<p class="description"><p>MongoDb does not need identifiers quoted, so this method simply returns the identifier.</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> The quoted identifier.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">string</span>
		<span class="method-name">
			name
		</span>
					(<span class="var-type">string</span>&nbsp;<span class="var-name">$name</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$name</span><span class="var-description">: The identifier to quote.</span>			</li>
				</ul>
		
			
	</div>
<a name="methodquery" id="query"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">query</span> (line <span class="line-number">1067</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">query method   If call getMongoDb() from model, this method call getMongoDb().</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			query
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$query</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$params</span> = <span class="var-default">array()</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$query</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$params</span><span class="var-description">: array()</span>			</li>
				</ul>
		
			
	</div>
<a name="methodread" id="read"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">read</span> (line <span class="line-number">908</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Read Data</p>
<p class="description"><p>For deleteAll(true) calls - the conditions will arrive here as true - account for that and switch to an empty array</p></p>
	<ul class="tags">
				<li><span class="field">return:</span> Results</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			read
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$query</span> = <span class="var-default">array()</span>], <span class="var-type">Model</span>&nbsp;<span class="var-name">$Model</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">Model</span>
				<span class="var-name">$Model</span><span class="var-description">: Model Instance</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$query</span><span class="var-description">: Query data</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$Model</span>			</li>
				</ul>
		
			
	</div>
<a name="methodrollback" id="rollback"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">rollback</span> (line <span class="line-number">1039</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">rollback method</p>
<p class="description"><p>MongoDB doesn't support transactions</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			rollback
		</span>
				()
			</div>
	
		
			
	</div>
<a name="methodsetTimeout" id="setTimeout"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">setTimeout</span> (line <span class="line-number">1222</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">setTimeout Method</p>
<p class="description"><p>Sets the MongoCursor timeout so long queries (like map / reduce) can run at will.  Expressed in milliseconds, for an infinite timeout, set to -1</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			setTimeout
		</span>
					(<span class="var-type">int</span>&nbsp;<span class="var-name">$ms</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$ms</span>			</li>
				</ul>
		
			
	</div>
<a name="methodtruncate" id="truncate"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">truncate</span> (line <span class="line-number">1050</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Deletes all the records in a table</p>
	<ul class="tags">
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			truncate
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$table</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$table</span><span class="var-description">: A string or model class representing the table to be truncated</span>			</li>
				</ul>
		
			
	</div>
<a name="methodupdate" id="update"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">update</span> (line <span class="line-number">677</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Update Data</p>
<p class="description"><p>This method uses $set operator automatically with MongoCollection::update().  If you don't want to use $set operator, you can chose any one as follw. <ol><li>Set TRUE in Model::mongoNoSetOperator property.</li><li>Set a mongodb operator in a key of save data as follow.
      Model-&gt;save(array('_id' =&gt; $id, '$inc' =&gt; array('count' =&gt; 1)));
      Don't use Model::mongoSchema property,
       CakePHP delete '$inc' data in Model::Save().</li><li>Set a Mongo operator in Model::mongoNoSetOperator property.
      Model-&gt;mongoNoSetOperator = '$inc';
      Model-&gt;save(array('_id' =&gt; $id, array('count' =&gt; 1)));</li></ol></p></p>
	<ul class="tags">
				<li><span class="field">return:</span> Update result</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			update
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$fields</span> = <span class="var-default">null</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$values</span> = <span class="var-default">null</span>], [<span class="var-type"></span>&nbsp;<span class="var-name">$conditions</span> = <span class="var-default">null</span>], <span class="var-type">Model</span>&nbsp;<span class="var-name">$Model</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">Model</span>
				<span class="var-name">$Model</span><span class="var-description">: Model Instance</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$fields</span><span class="var-description">: Field data</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$values</span><span class="var-description">: Save data</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$Model</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">$conditions</span>			</li>
				</ul>
		
			
	</div>
<a name="methodupdateAll" id="updateAll"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">updateAll</span> (line <span class="line-number">768</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Update multiple Record</p>
	<ul class="tags">
				<li><span class="field">return:</span> Update result</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">boolean</span>
		<span class="method-name">
			updateAll
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$fields</span> = <span class="var-default">null</span>], [<span class="var-type">array</span>&nbsp;<span class="var-name">$conditions</span> = <span class="var-default">null</span>], <span class="var-type">Model</span>&nbsp;<span class="var-name">$Model</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">Model</span>
				<span class="var-name">$Model</span><span class="var-description">: Model Instance</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$fields</span><span class="var-description">: Field data</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$conditions</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$Model</span>			</li>
				</ul>
		
			
	</div>
<a name="methodvalue" id="value"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">value</span> (line <span class="line-number">1123</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Prepares a value, or an array of values for database queries by quoting and escaping them.</p>
	<ul class="tags">
				<li><span class="field">return:</span> Prepared value or array of values.</li>
				<li><span class="field">access:</span> public</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">mixed</span>
		<span class="method-name">
			value
		</span>
					(<span class="var-type">mixed</span>&nbsp;<span class="var-name">$data</span>, [<span class="var-type">string</span>&nbsp;<span class="var-name">$column</span> = <span class="var-default">null</span>], [<span class="var-type">boolean</span>&nbsp;<span class="var-name">$read</span> = <span class="var-default">true</span>])
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$data</span><span class="var-description">: A value or an array of values to prepare.</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$column</span><span class="var-description">: The column into which this data will be inserted</span>			</li>
					<li>
				<span class="var-type">boolean</span>
				<span class="var-name">$read</span><span class="var-description">: Value to be used in READ or WRITE context</span>			</li>
				</ul>
		
			
	</div>
<a name="method_convertId" id="_convertId"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">_convertId</span> (line <span class="line-number">1271</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">convertId method</p>
<p class="description"><p>$conditions is used to determine if it should try to auto correct _id =&gt; array() queries  it only appies to conditions, hence the param name</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			_convertId
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$mixed</span>, [<span class="var-type">bool</span>&nbsp;<span class="var-name">$conditions</span> = <span class="var-default">false</span>], <span class="var-type">mixed</span>&nbsp;<span class="var-name">$mixed</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$mixed</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$conditions</span><span class="var-description">: false</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$mixed</span>			</li>
				</ul>
		
			
	</div>
<a name="method_prepareLogQuery" id="_prepareLogQuery"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">_prepareLogQuery</span> (line <span class="line-number">1200</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">prepareLogQuery method</p>
<p class="description"><p>Any prep work to log a query</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			_prepareLogQuery
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$Model</span>, <span class="var-type">mixed</span>&nbsp;<span class="var-name">$Model</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$Model</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$Model</span>			</li>
				</ul>
		
			
	</div>
<a name="method_setEmptyValues" id="_setEmptyValues"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">_setEmptyValues</span> (line <span class="line-number">1176</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Set empty values, arrays or integers, for the variables Mongo uses</p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			_setEmptyValues
		</span>
					(<span class="var-type"></span>&nbsp;<span class="var-name">&$data</span>, [<span class="var-type">array</span>&nbsp;<span class="var-name">$integers</span> = <span class="var-default">array('limit', 'offset')</span>], <span class="var-type">mixed</span>&nbsp;<span class="var-name">$data</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">mixed</span>
				<span class="var-name">$data</span>			</li>
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$integers</span><span class="var-description">: array('limit', 'offset')</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$data</span>			</li>
				</ul>
		
			
	</div>
<a name="method_stringify" id="_stringify"><!-- --></a>
<div class="evenrow">
	
	<div class="method-header">
		<span class="method-title">_stringify</span> (line <span class="line-number">1299</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">stringify method</p>
<p class="description"><p>Takes an array of args as an input and returns an array of json-encoded strings. Takes care of  any objects the arrays might be holding (MongoID);</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">array</span>
		<span class="method-name">
			_stringify
		</span>
					([<span class="var-type"></span>&nbsp;<span class="var-name">&$args</span> = <span class="var-default">array()</span>], [<span class="var-type">int</span>&nbsp;<span class="var-name">$level</span> = <span class="var-default">0</span>], <span class="var-type">array</span>&nbsp;<span class="var-name">$args</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$args</span><span class="var-description">: array()</span>			</li>
					<li>
				<span class="var-type">int</span>
				<span class="var-name">$level</span><span class="var-description">: 0 internal recursion counter</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$args</span>			</li>
				</ul>
		
			
	</div>
<a name="method_stripAlias" id="_stripAlias"><!-- --></a>
<div class="oddrow">
	
	<div class="method-header">
		<span class="method-title">_stripAlias</span> (line <span class="line-number">1339</span>)
	</div> 
	
	<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Convert automatically array('Model.field' =&gt; 'foo') to array('field' =&gt; 'foo')</p>
<p class="description"><p>This introduces the limitation that you can't have a (nested) field with the same name as the model  But it's a small price to pay to be able to use other behaviors/functionality with mongoDB</p></p>
	<ul class="tags">
				<li><span class="field">access:</span> protected</li>
			</ul>
	
	<div class="method-signature">
		<span class="method-result">void</span>
		<span class="method-name">
			_stripAlias
		</span>
					([<span class="var-type"></span>&nbsp;<span class="var-name">&$args</span> = <span class="var-default">array()</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$alias</span> = <span class="var-default">'Model'</span>], [<span class="var-type">bool</span>&nbsp;<span class="var-name">$recurse</span> = <span class="var-default">true</span>], [<span class="var-type">string</span>&nbsp;<span class="var-name">$check</span> = <span class="var-default">'key'</span>], <span class="var-type">array</span>&nbsp;<span class="var-name">$args</span>)
			</div>
	
			<ul class="parameters">
					<li>
				<span class="var-type">array</span>
				<span class="var-name">$args</span><span class="var-description">: array()</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$alias</span><span class="var-description">: 'Model'</span>			</li>
					<li>
				<span class="var-type">bool</span>
				<span class="var-name">$recurse</span><span class="var-description">: true</span>			</li>
					<li>
				<span class="var-type">string</span>
				<span class="var-name">$check</span><span class="var-description">: 'key', 'value' or 'both'</span>			</li>
					<li>
				<span class="var-type"></span>
				<span class="var-name">&$args</span>			</li>
				</ul>
		
			
	</div>
						
		</div>
	</div>


	<p class="notes" id="credit">
		Documentation generated on Tue, 26 Jul 2011 01:09:01 +0900 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.3</a>
	</p>
	</div></body>
</html>